define(['text!service/standards.html', '../service/data/standars'],
	function(viewTemplate, Standards) {
		return Piece.View.extend({
			id: 'service_standards',
			render: function() {
				$(this.el).html(viewTemplate);

				Piece.View.prototype.render.call(this);
				return this;
			},
			onShow: function() {
				//write your business logic here :)

				this.TempviewlateRender(Standards);


			},
			//模板页面渲染

			TempviewlateRender: function(data) {

				var listTemplateWiki = _.template($("#standardsTemp").html(), {
					"rows": data.rows
				});
				var liContainr = $("<li>");
				liContainr.append(listTemplateWiki);
				$("#standards").append(liContainr);
				var windowHeight = $(window).height();
				var elTop = $("#standards").offset().top;
				var elHeight = windowHeight - elTop - 35;

				console.info(elHeight);
				$("#standards").css({
					"height": elHeight
				});
				new iScroll($("#standards")[0]);


				// new iScroll($("#standards"));
			},
		}); //view define

	});